package com.buaa.airticketbookingsystem.Service.UserServiceImpl;

import com.buaa.airticketbookingsystem.Dao.FlightDao;
import com.buaa.airticketbookingsystem.Entity.Flight;
import com.buaa.airticketbookingsystem.Entity.Ticket;
import com.buaa.airticketbookingsystem.Service.FlightService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class FlightServiceImpl implements FlightService {

    @Autowired
    private FlightDao flightDao;

    @Override
    public void addNewFlight(Flight flight) {
        flightDao.addNewFlight(flight);
    }

    @Override
    public Flight selectFlightByID(String f_id) {
        return flightDao.selectFlightByID(f_id);
    }

    @Override
    public List<Flight> getAllFlights(String date, String from, String to, String start_time){
        return flightDao.getAllFlights(date, from , to , start_time);
    }

}
